package com.wonghiu.provider.imp;

import com.wonghiu.api.HelloService;
import com.wonghiu.api.vo.Hello;
import com.wonghiu.framework.service.annotation.HRpcService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Author wonghiu
 * @Date 2021/8/11 16:31
 * @Version 1.0.1
 */
@Component
@HRpcService
@Slf4j
public class HelloServiceHRpcImp implements HelloService {


    static {
        System.out.println("HelloServiceImpl被创建");
    }

    @Override
    public String hello(Hello hello) {
        log.info("HelloServiceImpl收到: {}.", hello.getMessage());
        String result = "Hello description is " + hello.getDescription();
        log.info("HelloServiceImpl返回: {}.", result);
        return result;
    }
}
